package dtaskboard.client.project.widget;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

import dtaskboard.client.dto.HistoryDTO;
import dtaskboard.client.project.dialog.CreateTaskDialog;
import dtaskboard.client.util.OpenDialogButton;

public class HistoryWidget extends VerticalPanel {

  public HistoryWidget(String projectName, HistoryDTO history) {
    Label label = new Label(history.getName());
    label.addStyleName("historyName");
    this.add(label);
    this.add(new OpenDialogButton("Criar tarefa", new CreateTaskDialog(
        projectName, history.getHistoryId())));
  }
}
